package com.zheng.upms.dao.model;

import java.io.Serializable;

public class UpmsDict implements Serializable {
    /**
     * 主键ID
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     * 字典代码
     *
     * @mbg.generated
     */
    private String dicCode;

    /**
     * 字典名
     *
     * @mbg.generated
     */
    private String dicName;

    /**
     * 字典值
     *
     * @mbg.generated
     */
    private String dicValue;

    /**
     * 字典展示文本
     *
     * @mbg.generated
     */
    private String dicText;

    /**
     * 父级ID
     *
     * @mbg.generated
     */
    private Integer parentId;

    /**
     * 是否删除（0、删除；1、未删除）
     *
     * @mbg.generated
     */
    private Integer flag;

    /**
     * 排列顺序
     *
     * @mbg.generated
     */
    private Integer sequence;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDicCode() {
        return dicCode;
    }

    public void setDicCode(String dicCode) {
        this.dicCode = dicCode;
    }

    public String getDicName() {
        return dicName;
    }

    public void setDicName(String dicName) {
        this.dicName = dicName;
    }

    public String getDicValue() {
        return dicValue;
    }

    public void setDicValue(String dicValue) {
        this.dicValue = dicValue;
    }

    public String getDicText() {
        return dicText;
    }

    public void setDicText(String dicText) {
        this.dicText = dicText;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", dicCode=").append(dicCode);
        sb.append(", dicName=").append(dicName);
        sb.append(", dicValue=").append(dicValue);
        sb.append(", dicText=").append(dicText);
        sb.append(", parentId=").append(parentId);
        sb.append(", flag=").append(flag);
        sb.append(", sequence=").append(sequence);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UpmsDict other = (UpmsDict) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDicCode() == null ? other.getDicCode() == null : this.getDicCode().equals(other.getDicCode()))
            && (this.getDicName() == null ? other.getDicName() == null : this.getDicName().equals(other.getDicName()))
            && (this.getDicValue() == null ? other.getDicValue() == null : this.getDicValue().equals(other.getDicValue()))
            && (this.getDicText() == null ? other.getDicText() == null : this.getDicText().equals(other.getDicText()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getFlag() == null ? other.getFlag() == null : this.getFlag().equals(other.getFlag()))
            && (this.getSequence() == null ? other.getSequence() == null : this.getSequence().equals(other.getSequence()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDicCode() == null) ? 0 : getDicCode().hashCode());
        result = prime * result + ((getDicName() == null) ? 0 : getDicName().hashCode());
        result = prime * result + ((getDicValue() == null) ? 0 : getDicValue().hashCode());
        result = prime * result + ((getDicText() == null) ? 0 : getDicText().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getFlag() == null) ? 0 : getFlag().hashCode());
        result = prime * result + ((getSequence() == null) ? 0 : getSequence().hashCode());
        return result;
    }
}